<template>
    <div class="wrap">
      
    </div>
</template>

<script>

import bus from '../common/bus';

export default {
    name: 'dashboard',
    data() {
       
        return {
             citys :[{
            lat: 28.68945529506072,
            lng: 115.86458944231661,
            name:'南昌',
            all:340,
            hasready:208,
            nopass:232,
            rate:'89.66%'
        }, {
        lat: 29.274247711040953,
        lng: 117.18457644638579,
        name:'景德镇',
        all:201,
        hasready:102,
        nopass:131,
        rate:'77.86%'
        },  {
            lat: 27.6283927093972,
            lng: 113.8614964337543,
            name:'萍乡市',
                all:147,
                hasready:37,
                nopass:37,
                rate:'100.00%'
        }, {
        lat: 27.823578697788587,
        lng: 114.9235346513963,
        name:'新余市',
        all:70,
        hasready:29,
        nopass:29,
        rate:'100.00%'
        }, {
            lat: 28.265787063191418,
            lng: 117.0755754270272,
            name:'鹰潭市',
            all:81,
            hasready:33,
            nopass:37,
            rate:'89.19%'
        },
        {
        lat: 29.712034,
        lng: 115.992811,
        name:'九江市',
                all:292,
                hasready:106,
                nopass:107,
                rate:'77.86%'
            },
        {
        lat: 25.85097,
        lng: 114.940278,
        name:'赣州市',
                all:1003,
                hasready:357,
                nopass:357,
                rate:'100.00%'
        }, {
            lat: 27.119726826070448,
        lng: 115.00051072001253,
        name:'吉安市',
                all:634,
                hasready:343,
                nopass:345,
                rate:'99.42%'
        }, { lat: 27.820856421848216,
        lng: 114.4235636759064,
        name:'宜春市',
                all:467,
                hasready:55,
                nopass:72,
                rate:'76.39%'
        }, {
            lat: 27.954892253419565,
        lng: 116.36453876864373,
        name:'抚州市',
                all:217,
                hasready:143,
                nopass:143,
                rate:'100.00%'
        }, {
            lat: 28.460625921851733,
            lng: 117.94945960312224,
            name:'上饶市',
                all:220,
                hasready:78,
                nopass:93,
                rate:'83.87%'
        }],
            name: localStorage.getItem('ms_username'),
            mapType:'卫星视图',
            map:null
        };
    },

    mounted(){
       
    },
    methods: {
        typeChange(val){
            if(val==='街道视图'){
                this.map.setMapType(BMAP_NORMAL_MAP);
            }else{
                this.map.setMapType(BMAP_EARTH_MAP);
            }
            
        },
        changeDate() {
            const now = new Date().getTime();
            this.data.forEach((item, index) => {
                const date = new Date(now - (6 - index) * 86400000);
                item.name = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
            });
        }
        // handleListener() {
        //     bus.on('collapse', this.handleBus);
        //     // 调用renderChart方法对图表进行重新渲染
        //     window.addEventListener('resize', this.renderChart);
        // },
        // handleBus(msg) {
        //     setTimeout(() => {
        //         this.renderChart();
        //     }, 200);
        // },
        // renderChart() {
        //     this.$refs.bar.renderChart();
        //     this.$refs.line.renderChart();
        // }
    }
};
</script>


<style scoped>
.wrap{
    height:100%;
    position:relative;
}
#allmap{
    height:100%;
}
.el-row {
    margin-bottom: 20px;
}

.grid-content {
    display: flex;
    align-items: center;
    height: 100px;
}
.map-content{
    background:#fff;
    position:absolute;
    width:300px;
    top:0px;
    right:0px;
    bottom:0;
    z-index:999; 
}
.map-type{
    background:#fff;
    position:absolute;
    top:10px;
    left:10px;
    z-index:999;
}
.grid-cont-right {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.grid-num {
    font-size: 30px;
    font-weight: bold;
}

.grid-con-icon {
    font-size: 50px;
    width: 100px;
    height: 100px;
    text-align: center;
    line-height: 100px;
    color: #fff;
}

.grid-con-1 .grid-con-icon {
    background: rgb(45, 140, 240);
}

.grid-con-1 .grid-num {
    color: rgb(45, 140, 240);
}

.grid-con-2 .grid-con-icon {
    background: rgb(100, 213, 114);
}

.grid-con-2 .grid-num {
    color: rgb(45, 140, 240);
}

.grid-con-3 .grid-con-icon {
    background: rgb(242, 94, 67);
}

.grid-con-3 .grid-num {
    color: rgb(242, 94, 67);
}

.user-info {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #ccc;
    margin-bottom: 20px;
}

.user-avator {
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

.user-info-cont {
    padding-left: 50px;
    flex: 1;
    font-size: 14px;
    color: #999;
}

.user-info-cont div:first-child {
    font-size: 30px;
    color: #222;
}

.user-info-list {
    font-size: 14px;
    color: #999;
    line-height: 25px;
}

.user-info-list span {
    margin-left: 70px;
}

.mgb20 {
    margin-bottom: 20px;
}

.todo-item {
    font-size: 14px;
}

.todo-item-del {
    text-decoration: line-through;
    color: #999;
}


</style>
